<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>短信管理平台</title>
    <!-- bootstrap - css -->
    <link th:href="@{/static/B-JUI/themes/css/bootstrap.css}" rel="stylesheet">
    <!-- core - css -->
    <link th:href="@{/static/B-JUI/themes/css/style.css}" rel="stylesheet">
    <link th:href="@{/static/B-JUI/themes/blue/core.css}" rel="stylesheet">
    <link th:href="@{/static/B-JUI/themes/css/fontsize.css}" rel="stylesheet">
    <!-- plug - css -->
    <link th:href="@{/static/B-JUI/plugins/kindeditor_4.1.11/themes/default/default.css}" rel="stylesheet">
    <link th:href="@{/static/B-JUI/plugins/colorpicker/css/bootstrap-colorpicker.min.css}" rel="stylesheet">
    <link th:href="@{/static/B-JUI/plugins/nice-validator-1.0.7/jquery.validator.css}" rel="stylesheet">
    <link th:href="@{/static/B-JUI/plugins/bootstrapSelect/bootstrap-select.css}" rel="stylesheet">
    <link th:href="@{/static/B-JUI/plugins/webuploader/webuploader.css}" rel="stylesheet">
    <link th:href="@{/static/B-JUI/themes/css/FA/css/font-awesome.min.css}" rel="stylesheet">
    <!-- Favicons -->
    <link rel="apple-touch-icon-precomposed" th:href="@{/static/assets/ico/apple-touch-icon-precomposed.png}">
    <link rel="shortcut icon" th:href="@{/static/assets/ico/favicon.png}">
    <!--[if lte IE 7]>
    <link th:href="@{/static/B-JUI/themes/css/ie7.css}" rel="stylesheet">
    <![endif]-->
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lte IE 9]>
    <script th:src="@{/static/B-JUI/other/html5shiv.min.js}"></script>
    <script th:src="@{/static/B-JUI/other/respond.min.js}"></script>
    <![endif]-->
    <!-- jquery -->
    <script th:src="@{/static/B-JUI/js/jquery-1.11.3.min.js}"></script>
    <script th:src="@{/static/B-JUI/js/jquery.cookie.js}"></script>
    <!--[if lte IE 9]>
    <script th:src="@{/static/B-JUI/other/jquery.iframe-transport.js}"></script>
    <![endif]-->
    <!-- B-JUI -->
    <script th:src="@{/static/B-JUI/js/bjui-all.js}"></script>
    <!-- plugins -->
    <!-- swfupload for kindeditor -->
    <script th:src="@{/static/B-JUI/plugins/swfupload/swfupload.js}"></script>
    <!-- Webuploader -->
    <script th:src="@{/static/B-JUI/plugins/webuploader/webuploader.js}"></script>
    <!-- kindeditor -->
    <script th:src="@{/static/B-JUI/plugins/kindeditor_4.1.11/kindeditor-all-min.js}"></script>
    <script th:src="@{/static/B-JUI/plugins/kindeditor_4.1.11/lang/zh-CN.js}"></script>
    <!-- colorpicker -->
    <script th:src="@{/static/B-JUI/plugins/colorpicker/js/bootstrap-colorpicker.min.js}"></script>
    <!-- ztree -->
    <script th:src="@{/static/B-JUI/plugins/ztree/jquery.ztree.all-3.5.js}"></script>
    <!-- nice validate -->
    <script th:src="@{/static/B-JUI/plugins/nice-validator-1.0.7/jquery.validator.js}"></script>
    <script th:src="@{/static/B-JUI/plugins/nice-validator-1.0.7/jquery.validator.themes.js}"></script>
    <!-- bootstrap plugins -->
    <script th:src="@{/static/B-JUI/plugins/bootstrap.min.js}"></script>
    <script th:src="@{/static/B-JUI/plugins/bootstrapSelect/bootstrap-select.min.js}"></script>
    <script th:src="@{/static/B-JUI/plugins/bootstrapSelect/defaults-zh_CN.min.js}"></script>
    <!-- icheck -->
    <script th:src="@{/static/B-JUI/plugins/icheck/icheck.min.js}"></script>
    <!-- HighCharts -->
    <script th:src="@{/static/B-JUI/plugins/highcharts/highcharts.js}"></script>
    <script th:src="@{/static/B-JUI/plugins/highcharts/highcharts-3d.js}"></script>
    <script th:src="@{/static/B-JUI/plugins/highcharts/themes/gray.js}"></script>
    <!-- other plugins -->
    <script th:src="@{/static/B-JUI/plugins/other/jquery.autosize.js}"></script>
    <link th:href="@{/static/B-JUI/plugins/uploadify/css/uploadify.css}" rel="stylesheet">
    <script th:src="@{/static/B-JUI/plugins/uploadify/scripts/jquery.uploadify.min.js}"></script>
    <script th:src="@{/static/B-JUI/plugins/download/jquery.fileDownload.js}"></script>


    <!-- init -->
    <script type="text/javascript">
        $.prototype.serializeObject = function () {
            var a, o, h, i, e;
            a = this.serializeArray();
            o = {};
            h = o.hasOwnProperty;
            for (i = 0; i < a.length; i++) {
                e = a[i];
                if (!h.call(o, e.name)) {
                    o[e.name] = e.value;
                }
            }
            return o;
        };
        $(function () {
            BJUI.init({
                JSPATH: 'B-JUI/',         //[可选]框架路径
                PLUGINPATH: 'B-JUI/plugins/', //[可选]插件路径
                loginInfo: {url: 'login_timeout.html', title: '登录', width: 440, height: 240}, // 会话超时后弹出登录对话框
                statusCode: {ok: 200, error: 300, timeout: 301}, //[可选]
                ajaxTimeout: 300000, //[可选]全局Ajax请求超时时间(毫秒)
                alertTimeout: 3000,  //[可选]信息提示[info/correct]自动关闭延时(毫秒)
                pageInfo: {
                    total: 'totalRow',
                    pageCurrent: 'pageCurrent',
                    pageSize: 'pageSize',
                    orderField: 'orderField',
                    orderDirection: 'orderDirection'
                }, //[可选]分页参数
                keys: {statusCode: 'statusCode', message: 'message'}, //[可选]
                ui: {
                    sidenavWidth: 220,
                    showSlidebar: true, //[可选]左侧导航栏锁定/隐藏
                    overwriteHomeTab: false //[可选]当打开一个未定义id的navtab时，是否可以覆盖主navtab(我的主页)
                },
                debug: true,    // [可选]调试模式 [true|false，默认false]
                theme: 'green' // 若有Cookie['bjui_theme'],优先选择Cookie['bjui_theme']。皮肤[五种皮肤:default, orange, purple, blue, red, green]
            })
            //时钟
            var today = new Date(), time = today.getTime()
            $('#bjui-date').html(today.formatDate('yyyy/MM/dd'))
            setInterval(function () {
                today = new Date(today.setSeconds(today.getSeconds() + 1))
                $('#bjui-clock').html(today.formatDate('HH:mm:ss'))
            }, 1000)
            setInterval(function () {
                $.get('/admin/logon/keepsession', function (d) {
                });
            }, 1000 * 60 * 1)
        })

        /*window.onbeforeunload = function(){
            return "确定要关闭本系统 ?";
        }*/

        //菜单-事件-zTree
        function MainMenuClick(event, treeId, treeNode) {
            if (treeNode.target && treeNode.target == 'dialog' || treeNode.target == 'navtab')
                event.preventDefault()

            if (treeNode.isParent) {
                var zTree = $.fn.zTree.getZTreeObj(treeId)

                zTree.expandNode(treeNode)
                return
            }

            if (treeNode.target && treeNode.target == 'dialog')
                $(event.target).dialog({id: treeNode.targetid, url: treeNode.url, title: treeNode.name})
            else if (treeNode.target && treeNode.target == 'navtab')
                $(event.target).navtab({
                    id: treeNode.targetid,
                    url: treeNode.url,
                    title: treeNode.name,
                    fresh: treeNode.fresh,
                    external: treeNode.external
                })
        }

        // 满屏开关
        var bjui_index_container = 'container_fluid'

        function bjui_index_exchange() {
            bjui_index_container = bjui_index_container == 'container_fluid' ? 'container' : 'container_fluid'

            $('#bjui-top').find('> div').attr('class', bjui_index_container)
            $('#bjui-navbar').find('> div').attr('class', bjui_index_container)
            $('#bjui-body-box').find('> div').attr('class', bjui_index_container)
        }
    </script>
    <!-- highlight && ZeroClipboard -->
    <link th:href="@{/static/assets/prettify.css}" rel="stylesheet">
    <script th:src="@{/static/assets/prettify.js}"></script>
    <link th:href="@{/static/assets/ZeroClipboard.css}" rel="stylesheet">
    <script th:src="@{/static/assets/ZeroClipboard.js}"></script>
    <script th:src="@{/static/js/common.js}"></script>
</head>
<body>
<!--[if lte IE 7]>
<div id="errorie">
    <div>您还在使用老掉牙的IE，正常使用系统前请升级您的浏览器到 IE8以上版本 <a target="_blank"
                                                 href="http://windows.microsoft.com/zh-cn/internet-explorer/ie-8-worldwide-languages">点击升级</a>&nbsp;&nbsp;强烈建议您更改换浏览器：<a
            href="http://down.tech.sina.com.cn/content/40975.html" target="_blank">谷歌 Chrome</a></div>
</div>
<![endif]-->
<div id="bjui-top" class="bjui-header">
    <div class="container_fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapsenavbar"
                    data-target="#bjui-top-collapse" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <nav class="collapse navbar-collapse" id="bjui-top-collapse">
            <ul class="nav navbar-nav navbar-right">
                <li>服务器IP:</li>
                <li class="datetime"><a><span id="bjui-date">0000/00/00</span> <span id="bjui-clock">00:00:00</span></a>
                </li>
                <li><a href="/admin/logon/out" style="font-weight:bold;">&nbsp;<i class="fa fa-power-off"></i> 注销登陆</a>
                </li>
                <li >    <a href="javascript:void" id="sessionid" name="indexli"        th:text="${name}"></a>
                </li>
                <script type="text/javascript">
                    var indexli = $('#sessionid').attr('name');
                    console.info("刷新了主页面" + indexli)
                    if (indexli != 'indexli') {
                        window.location.href = '/login.html';
                    }
                </script>
                <li><a href="/admin/user/passwdview" data-toggle="dialog" data-id="sys_user_changepass" data-mask="true"
                       data-width="400" data-height="300">修改密码</a></li>


                <li class="dropdown">
                    <a href="#" class="dropdown-toggle bjui-fonts-tit" data-toggle="dropdown"
                       title="更改字号"><i class="fa fa-font"></i> 大</a>
                    <ul class="dropdown-menu" role="menu" id="bjui-fonts">
                        <li><a href="javascript:;" class="bjui-font-c" data-toggle="fonts"><i class="fa fa-font"></i> 中</a>
                        </li>
                        <li><a href="javascript:;" class="bjui-font-d" data-toggle="fonts"><i class="fa fa-font"></i> 小</a>
                        </li>
                    </ul>
                </li>


                <li><a href="javascript:;" onclick="bjui_index_exchange()" title="横向收缩/充满屏幕"><i
                        class="fa fa-exchange"></i></a></li>
            </ul>
        </nav>
    </div>

</div>
<header class="navbar bjui-header" id="bjui-navbar">

    <div class="container_fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" id="bjui-navbar-collapsebtn"
                    data-toggle="collapsenavbar" data-target="#bjui-navbar-collapse" aria-expanded="false">
                <i class="fa fa-angle-double-right"></i>
            </button>
            <a class="navbar-brand" href="#">
                <img src="https://www.kxdao.net/static/image/smiley/ttemoji/ae9.png" height="30">
            </a>
            <div id="qrcode"></div>

        </div>

        <nav class="collapse navbar-collapse" id="bjui-navbar-collapse">
            <ul class="nav navbar-nav navbar-right" id="bjui-hnav-navbar">
                <li class="active">
                    <a th:href="@{/admin/logon/menulist}" data-toggle="sidenav" data-id-key="targetid"
                       style="display: none"></a>
                </li>

            </ul>
        </nav>
    </div>
</header>
<div id="bjui-body-box">
    <div class="container_fluid" id="bjui-body">
        <div id="bjui-sidenav-col">
            <div id="bjui-sidenav">
                <div id="bjui-sidenav-arrow" data-toggle="tooltip" data-placement="left" data-title="隐藏左侧菜单">
                    <i class="fa fa-long-arrow-left"></i>
                </div>
                <div id="bjui-sidenav-box">

                </div>
            </div>
        </div>
        <div id="bjui-navtab" class="tabsPage">
            <div id="bjui-sidenav-btn" data-toggle="tooltip" data-title="显示左侧菜单" data-placement="right">
                <i class="fa fa-bars"></i>
            </div>
            <div class="tabsPageHeader">
                <div class="tabsPageHeaderContent">
                    <ul class="navtab-tab nav nav-tabs">
                        <li><a href="javascript:;"><span><i class="fa fa-home"></i> #maintab#</span></a></li>
                    </ul>
                </div>
                <div class="tabsLeft"><i class="fa fa-angle-double-left"></i></div>
                <div class="tabsRight"><i class="fa fa-angle-double-right"></i></div>
                <div class="tabsMore"><i class="fa fa-angle-double-down"></i></div>
            </div>
            <ul class="tabsMoreList">
                <li><a href="javascript:;">#maintab#</a></li>
            </ul>
            <div class="navtab-panel tabsPageContent">
                <div class="navtabPage unitBox">
                    <iframe th:src="@{/admin/logon/mypage}" scrolling="auto" frameborder="0"
                            style="width:100%;height:100%;"></iframe>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script th:src="@{/static/B-JUI/other/ie10-viewport-bug-workaround.js}"></script>
</body>
</html>

<script>
    setTimeout(init, 1000);

    function init() {
        var obj = $("a[href='userstat?action=maininit']");
        if (obj != null)
            $(obj).click();
    }

</script>


<script type="text/javascript">
    function c1() {
        $("#img_a1").remove();
        $("#show1").show();
        var r = new FileReader();
        f = document.getElementById('file1').files[0];
        r.readAsDataURL(f);
        r.onload = function (e) {
            document.getElementById('show1').src = this.result;
        };
    }

    function c2() {
        $("#img_a2").remove();
        $("#show2").show();
        var r = new FileReader();
        f = document.getElementById('file2').files[0];
        r.readAsDataURL(f);
        r.onload = function (e) {
            document.getElementById('show2').src = this.result;
        };
    }

    function c3() {
        $("#img_a3").remove();
        $("#show3").show();
        var r = new FileReader();
        f = document.getElementById('file3').files[0];
        r.readAsDataURL(f);
        r.onload = function (e) {
            document.getElementById('show3').src = this.result;
        };
    }

    function c4() {
        $("#img_a4").remove();
        $("#show4").show();
        var r = new FileReader();
        f = document.getElementById('file4').files[0];
        r.readAsDataURL(f);
        r.onload = function (e) {
            document.getElementById('show4').src = this.result;
        };
    }

    function c5() {
        $("#img_a5").remove();
        $("#show5").show();
        var r = new FileReader();
        f = document.getElementById('file5').files[0];
        r.readAsDataURL(f);
        r.onload = function (e) {
            document.getElementById('show5').src = this.result;
        };
    }
    function c6(name) {
        if (1 == name) {//本地上传
            document.getElementById("coverimg1").style.display = "";
            document.getElementById("coverimg2").style.display = "none";
        } else {//网络地址
            document.getElementById("coverimg1").style.display = "none";
            document.getElementById("coverimg2").style.display = "";
        }
    }


    function selectlzxadonchange() {
        var selectlzxad = $('#selectlzxad').val();
        if (selectlzxad != 1) {
            document.getElementById("divlzxstartpagead").style.display = "none";
            document.getElementById("divlzxstartpagead2").style.display = "none";

            document.getElementById("divlzxstartpagead3").readOnly = true;
            document.getElementById("divlzxstartpagead4").readOnly= true;
        } else {
            document.getElementById("divlzxstartpagead").style.display = "";
            document.getElementById("divlzxstartpagead2").style.display = "";

            document.getElementById("divlzxstartpagead3").readOnly = false;
            document.getElementById("divlzxstartpagead4").readOnly= false;
        }
    }

    function toUtf8(str) {   //地址中可用中文字符
        var out, i, len, c;
        out = "";
        len = str.length;
        for (i = 0; i < len; i++) {
            c = str.charCodeAt(i);
            if ((c >= 0x0001) && (c <= 0x007F)) {
                out += str.charAt(i);
            } else if (c > 0x07FF) {
                out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
                out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
                out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
            } else {
                out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
                out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
            }
        }
        return out;
    }


</script>